#pragma once


#include "GridCtrl/GridCtrl.h"
#include "RealObject/Product.h"
// CBasketView form view

class CBasketView : public CView
{
	DECLARE_DYNCREATE(CBasketView)

public:
	CBasketView();           // protected constructor used by dynamic creation
	virtual ~CBasketView();

public:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif
public:
	afx_msg void OnGridRClick(NMHDR *pNMHDR, LRESULT *pResult);	
	afx_msg void OnEndEdit(NMHDR *pNMHDR, LRESULT *pResult);
	
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	

public:
	void initBasket();
	void insertToBasket(CProduct* product,const int& nCount);
public:
	CGridCtrl m_GridBasketView;
	CImageList m_ImageList;	
};


